var express = require('express');
var userRouter = express.Router();
let {
    login,
    getUserList,
    getUserAvatar,
    UpdateUserConfig,
    GetUserConfig
} =  require('../controller/user.controller');
// 文件存储中间件
let MulterUpload = require('../middleware/file.middleware');
/* GET users listing. */
// 登录接口
userRouter.post('/login', login);
// 获取在线用户
userRouter.get('/getUserList',getUserList);

// 用户上传头像/登录页自定义背景/聊天自定义背景
userRouter.post('/UploadImg',MulterUpload,UpdateUserConfig);

// 获取用户自定义设置图片：自定义头像/自定义聊天背景
userRouter.get('/getUserConfig',GetUserConfig);
module.exports = userRouter;
